package com.etooling.pdm.entity;

import com.etooling.framework.svo.AbstractEntity;
import lombok.Data;

import javax.persistence.*;

/**
 * 规格属性配置值
 *
 * @author dan
 * @date 2023/12/25 9:28
 */
@Data
@Entity
@Table(name = "t_goods_specs_prop_values", schema = "pdm")
public class GoodsSpecsPropValues extends AbstractEntity {

    Goods goods;
    GoodsSpecsPropSetting goodsSpecsPropSetting;
    GoodsSpecs goodsSpecs;
    String value;
    String code;

    @ManyToOne(targetEntity = Goods.class, fetch = FetchType.EAGER)
    @JoinColumn(name = "goods_id")
    public Goods getGoods() {
        return goods;
    }

    @ManyToOne(targetEntity = GoodsSpecsPropSetting.class, fetch = FetchType.EAGER)
    @JoinColumn(name = "setting_id")
    public GoodsSpecsPropSetting getGoodsSpecsPropSetting() {
        return goodsSpecsPropSetting;
    }

    @ManyToOne(targetEntity = GoodsSpecs.class, fetch = FetchType.EAGER)
    @JoinColumn(name = "goods_specs_id")
    public GoodsSpecs getGoodsSpecs() {
        return goodsSpecs;
    }


}
